/* -------------------------
 * Denise Pollock
 * Homework 4
 * 7/23/14
 * Random Test for Smithy
 * -------------------------
 */

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"
#include <math.h>
#include <stdlib.h>
#include <time.h>

int main() {
	struct gameState state;
	int p, r, i, currentPlayer, handPos, numPlayer, seed;

	int k[10] = { adventurer, council_room, feast, gardens, mine, remodel,
			smithy, village, baron, great_hall };
	srand(time(NULL));
	p = 0;

	while (p < 1000) {
		seed = rand() % 1000;
		numPlayer = (rand() % 2) + 2;
		currentPlayer = rand() % numPlayer;
		handPos = rand() % 10;

		memset(&state, 23, sizeof(struct gameState));
		r = initializeGame(numPlayer, k, seed, &state);

		zzzsmithycardplay(i, currentPlayer, handPos, &state);

		printf("i = %d, currentPlayer=%d, handPos=%d, seed=%d\n",
				i, currentPlayer, handPos, seed);
		p++;
	}
}
